
uniform vec3 vp;
uniform vec3 scale;
uniform mat4 pMatrix;
uniform mat4 mvMatrix;



attribute vec3 a_position;
attribute vec3 a_normal;


varying vec3 vTexCoord;
varying vec3 vNormal;
varying vec3 vViewVec;

void main(void)
{

   vec4 pos = pMatrix * mvMatrix * vec4(a_position, 1.0) ;   
  
   gl_Position =  pos;

   vTexCoord   = a_position;

	pos.xyz += vp.xyz ;
	
	
	pos.z = normalize(pos.z);
   vViewVec    = pos.xyz;
   vNormal     = a_normal;
}